using System.Collections.Generic;

namespace OracleInternal.SqlAndPlsqlParser.LocalParsing
{
	internal class OracleLpJoinCondition
	{
		protected OracleLpJoinConditionType m_vType;

		protected OracleLpCondition m_vCondition;

		protected List<OracleLpColumn> m_vColumns;

		public OracleLpJoinConditionType Type
		{
			get
			{
				return m_vType;
			}
			set
			{
				switch (value)
				{
				case OracleLpJoinConditionType.On:
					m_vColumns = null;
					break;
				case OracleLpJoinConditionType.Using:
					m_vCondition = null;
					m_vColumns = new List<OracleLpColumn>();
					break;
				default:
					m_vCondition = null;
					m_vColumns = null;
					break;
				}
			}
		}

		public OracleLpCondition Condition
		{
			get
			{
				return m_vCondition;
			}
			set
			{
				m_vCondition = value;
			}
		}

		public List<OracleLpColumn> Columns => m_vColumns;
	}
}
